package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Tel      string `gorm:"type:char(11)"json:"tel"`
	Username string `gorm:"type:varchar(30)"json:"username"`
}
type House struct {
	gorm.Model
	UserId  int     `gorm:"type:int(11)"json:"userId"`
	Title   string  `gorm:"type:varchar(30)"json:"title"`
	Address string  `gorm:"type:varchar(30)"json:"address"`
	Price   float64 `gorm:"decimal(10,2)"json:"price"`
}
type Consultation struct {
	gorm.Model
	UserId  int    `gorm:"type:int(11)"json:"userId"`
	HouseId int    `gorm:"type:int(11)"json:"houseId"`
	Text    string `gorm:"type:varchar(50)"json:"text"`
	Number  int    `gorm:"type:int(11)"json:"number"`
}
type Collection struct {
	gorm.Model
	UserId  int `gorm:"type:int(11)"json:"userId"`
	HouseId int `gorm:"type:int(11)"json:"houseId"`
	Num     int `gorm:"type:int(11)"json:"num"`
}
type Broker struct {
	gorm.Model
	UserId  int    `gorm:"type:int(11)"json:"userId"`
	HouseId int    `gorm:"type:int(11)"json:"houseId"`
	Content string `gorm:"type:varchar(30)"json:"content"`
}
